import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'

// https://vitejs.dev/config/
export default defineConfig({
	optimizeDeps: {
		exclude:['sard-uniapp']
	},
	build: {
		// 开发阶段启用源码映射：https://uniapp.dcloud.net.cn/tutorial/migration-to-vue3.html#需主动开启-sourcemap
		sourcemap: process.env.NODE_ENV === 'development',
	},
	plugins: [uni()],
	// 不用代理
	// server: {
	// 	proxy: {
	// 		'.*/api': {
	// 			target: 'http://127.0.0.1:8080',
	// 			changeOrigin: true,
	// 			rewrite: (path) => {
	// 				return path.replace('/api', '')
	// 			},
	// 		},
	// 	},
	// },
})